#include "compare.h"
#include "type.h"

int compare(void *own, void *other)
{
    return *(TYPE *)own - *(TYPE *)other;
}

bool equal(void *own, void *other)
{
    return !compare(own, other);
}

bool less(void *own, void *other)
{
    return compare(own, other) < 0;
}

bool more(void *own, void *other)
{
    return compare(own, other) > 0;
}
